Demo: Was Sie am Ende des Semesters können
Messwerte auswerten und darstellen – in 12 Zeilen:
import matplotlib.pyplot as plt
stunden = [8, 9, 10, 11, 12, 13, 14, 15]
temperaturen = [18.2, 19.1, 21.4, 24.0, 26.3, 27.1, 25.8, 22.5]
maximum = max(temperaturen)
print(f"Höchstwert: {maximum} °C")
plt.plot(stunden, temperaturen, "b-o")
plt.xlabel("Uhrzeit")
plt.ylabel("Temperatur in °C")
plt.grid(True)
plt.show()